package com.itheima.controller.v1;


import com.itheima.common.R;
import com.itheima.controller.v1.api.DictDataControllerApi;
import com.itheima.pojo.SysDictData;
import com.itheima.service.SysDictDataService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/dictData")
@Slf4j
public class DictDataController implements DictDataControllerApi {
    @Autowired
    private SysDictDataService sysDictDataService;

    //字典列表
    @Override
    @GetMapping("/{dictType}")
    public R dictDataList(@PathVariable String dictType) {
        return sysDictDataService.selectByDictType(dictType);
    }

}
